<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>AdminLTE 2 | Calendar</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- Bootstrap 3.3.2 -->
    <link href="<?php echo base_url();?>frontend/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="<?php echo base_url();?>frontend/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons -->
    <link href="<?php echo base_url();?>frontend/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="<?php echo base_url();?>frontend/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- AdminLTE Skins. Choose a skin from the css/skins 
         folder instead of downloading all of them to reduce the load. -->
    <link href="<?php echo base_url();?>frontend/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo base_url();?>frontend/css/admin.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>
  <body class="skin-blue">
	<script>
		var base_url = '<?php echo site_url();?>';
		<?php if(isset($subview)){ echo "var subview='{$subview}'";}?>
	</script>
    <div class="wrapper">
      
      <header class="main-header">
        <a href="index2.html" class="logo"><b>Admin</b>LTE</a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
              <!-- User Account: style can be found in dropdown.less -->
              <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <img src="<?php echo base_url();?>frontend/dist/img/user2-160x160.jpg" class="user-image" alt="User Image"/>
                  <span class="hidden-xs">Administrator</span>
                </a>
                <ul class="dropdown-menu">
                  <!-- User image -->
                  <li class="user-header">
                    <img src="<?php echo base_url();?>frontend/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
                    <p>
                      Administrator - Web Developer
                      <small>Member since Nov. 2012</small>
                    </p>
                  </li>
                  <!-- Menu Body -->
                  <li class="user-body">
                    <div class="col-xs-4 text-center">
                      <a href="#">Followers</a>
                    </div>
                    <div class="col-xs-4 text-center">
                      <a href="#">Sales</a>
                    </div>
                    <div class="col-xs-4 text-center">
                      <a href="#">Friends</a>
                    </div>
                  </li>
                  <!-- Menu Footer-->
                  <li class="user-footer">
                    <div class="pull-left">
                      <a href="<?php echo base_url();?>changepassword" class="btn btn-default btn-flat">Change Password</a>
                    </div>
                    <div class="pull-right">
                      <a href="<?php echo base_url();?>logout" class="btn btn-default btn-flat">Sign out</a>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </div>
        </nav>
      </header>
      <!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- Sidebar user panel -->
          <div class="user-panel">
            <div class="pull-left image">
              <img src="<?php echo base_url();?>frontend/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
            </div>
            <div class="pull-left info">
              <p>Administrator</p>
              <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
          </div>
          <!-- search form -->
          <!--<form action="#" method="get" class="sidebar-form">
            <div class="input-group">
              <input type="text" name="q" class="form-control" placeholder="Search..."/>
              <span class="input-group-btn">
                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
              </span>
            </div>
          </form>-->
          <!-- /.search form -->
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul class="sidebar-menu">
            <li class="header">Quản lý</li>
            <li class="treeview">
              <a href="#">
                <i class="fa fa-dashboard"></i> <span>Quản lý sản phẩm</span> <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="<?php echo base_url();?>product"><i class="fa fa-circle-o"></i>Thông tin</a></li>
                <li><a href="<?php echo base_url();?>productimage"><i class="fa fa-circle-o"></i>Hình ảnh</a></li>
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-dashboard"></i> <span>Quản lý category</span> <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="<?php echo base_url();?>category1"><i class="fa fa-circle-o"></i>Category 1</a></li>
                <li><a href="<?php echo base_url();?>category2"><i class="fa fa-circle-o"></i>Category 2</a></li>
				<li><a href="<?php echo base_url();?>category3"><i class="fa fa-circle-o"></i>Category 3</a></li>
				<li><a href="<?php echo base_url();?>mapcategory"><i class="fa fa-circle-o"></i>Map category</a></li>
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-dashboard"></i> <span>Quản lý size</span> <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="<?php echo base_url();?>typeofsize"><i class="fa fa-circle-o"></i>Type Of Size</a></li>
                <li><a href="<?php echo base_url();?>productsize"><i class="fa fa-circle-o"></i>Product Size</a></li>
              </ul>
            </li>
			<li class="treeview">
              <a href="#">
                <i class="fa fa-dashboard"></i> <span>Quản lý khác</span> <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <li><a href="<?php echo base_url();?>productfit"><i class="fa fa-circle-o"></i>Product Fit</a></li>
                <li><a href="<?php echo base_url();?>productcrotch"><i class="fa fa-circle-o"></i>Product Crotch</a></li>
				<li><a href="<?php echo base_url();?>productcode"><i class="fa fa-circle-o"></i>Product Code</a></li>
              </ul>
            </li>
			<?php if(isset($open_user_view) && $open_user_view == true) {?>
            <li><a href="<?php echo base_url();?>user"><i class="fa fa-user"></i>Quản lý người dùng</a></li>
			<?php } ?>
          </ul>
        </section>
        <!-- /.sidebar -->
      </aside>

      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper" style="overflow: auto;">
	  <section class="content-header">
          <h1>
            <?php echo $title;?>
          </h1>
		  <?php if(isset($view)){$this->load->view($view);}?> 
        </section>
      </div><!-- /.content-wrapper -->
      <!--<footer class="main-footer">
        <div class="pull-right hidden-xs">
          <b>Version</b> 2.0
        </div>
        <strong>Copyright &copy; 2014-2015 <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong> All rights reserved.
      </footer>-->
    </div><!-- ./wrapper -->

    <!-- jQuery 2.1.3 -->
    <script src="<?php echo base_url();?>frontend/js/jquery.min.js"></script>
    <!-- Bootstrap 3.3.2 JS -->
    <script src="<?php echo base_url();?>frontend/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <!-- jQuery UI 1.11.1 -->
    <script src="<?php echo base_url();?>frontend/js/jquery-ui.min.js" type="text/javascript"></script>
	<!-- DATA TABES SCRIPT -->
    <script src="<?php echo base_url();?>frontend/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
    <script src="<?php echo base_url();?>frontend/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
    <!-- Slimscroll -->
    <script src="<?php echo base_url();?>frontend/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <!-- FastClick -->
    <script src='<?php echo base_url();?>frontend/plugins/fastclick/fastclick.min.js'></script>
    <!-- AdminLTE App -->
    <script src="<?php echo base_url();?>frontend/dist/js/app.min.js" type="text/javascript"></script>
	<script src="<?php echo base_url();?>frontend/js/constants.js" type="text/javascript"></script>
	<script src="<?php echo base_url();?>frontend/js/utils.js" type="text/javascript"></script>
	<?php if(isset($view)){
		$jsFile = '';
		switch($view){
			case 'main_layout/category': $jsFile = 'admin_category.js'; break;
			case 'main_layout/productfit': $jsFile = 'admin_fit.js'; break;
			case 'main_layout/productsize': $jsFile = 'admin_size.js'; break;
			case 'main_layout/productcode': $jsFile = 'admin_code.js'; break;
			case 'main_layout/productimage': $jsFile = 'admin_image.js'; break;
			case 'main_layout/mapcategory': $jsFile = 'admin_mapcategory.js'; break;
			case 'main_layout/product': $jsFile = 'admin_product.js'; break;
			case 'main_layout/user': $jsFile = 'admin_user.js'; break;
			case 'main_layout/changepassword': $jsFile = 'admin_changepass.js'; break;
			default: break;
		}
		if($jsFile != ''){
	?>
		<script src="<?php echo base_url();?>frontend/js/<?php echo $jsFile;?>" type="text/javascript"></script>
	<?php } }?>
  </body>
</html>